Skip to content

Aws s3#2418

Closed
jonodrew wants to merge 4 commits into
codebar:masterfrom
jonodrew:aws-s3
Closed

Aws s3#2418
jonodrew wants to merge 4 commits into
codebar:masterfrom
jonodrew:aws-s3

Conversation

@jonodrew

@jonodrew jonodrew commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Outline terraform for creating an S3 bucket and IAM role for @till to try out his auth stuff

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
This should add an S3 bucket and a role that can do things with it.

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
This creates a user and the appropriate role for the user. I've used the sts AssumeRole approach here, to separate the admin role from the user

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
Comment thread infra/main.tf

# 1. S3 Bucket (private by default)
resource "aws_s3_bucket" "auth_bucket" {
bucket = "codebar-planner-auth-bucket"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to create buckets myself, but otherwise I'd like 2 - one prod, one staging.

Comment thread infra/main.tf
"s3:GetObject", # Read/download files
"s3:PutObject", # Upload files
"s3:DeleteObject", # Optional: allow deleting files
"s3:ListAllMyBuckets" # enable user to list all buckets

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be un-scoped - per bucket, you need something like this (this is the json format):

{
   "Version":"2012-10-17",		 	 	 
   "Statement":[
      {
         "Effect":"Allow",
         "Action": "s3:ListAllMyBuckets",
         "Resource":"*"
      },
      {
         "Effect":"Allow",
         "Action":["s3:ListBucket","s3:GetBucketLocation"],
         "Resource":"arn:aws:s3:::bucket-name-etc"
      },
      {
         "Effect":"Allow",
         "Action":[
            "s3:PutObject",
            "s3:GetObject",
            "s3:DeleteObject"
         ],
         "Resource":"arn:aws:s3:::bucket-name-etc/*"
      }
   ]
}

@mroderick

Copy link
Copy Markdown
Collaborator

Do we still need this PR?

@till

till commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Do we still need this PR?

No, good for now

@till till closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants